import { configureStore } from '@reduxjs/toolkit';
import AuthReducer from './Auth';
import AnalyzeReducer from './Analyze';
import UserManagementReducer from './UserManagement';
import SelectHistoryReducer from './SelectHistory';
import PersonalInformationReducer from './PersonalInformation';
import GlobalReducer from './Global';

const store = configureStore({
  reducer: {
    Auth: AuthReducer,
    Analyze: AnalyzeReducer,
    UserManagement: UserManagementReducer,
    SelectHistory: SelectHistoryReducer,
    PersonalInformation: PersonalInformationReducer,
    Global: GlobalReducer
  }
});

export type AppDispatch = typeof store.dispatch;
export type RootState = ReturnType<typeof store.getState>;
export { store };